//
//  RadioActionBridge.m
//  iCodeMacRun
//
//  Created by Andrew Barry on 6/04/09.
//  Copyright 2009 Barry Computer Services. All rights reserved.
//

#import "RadioActionBridge.h"
#import "NSRadioButtonICM.h"

@implementation RadioActionBridge
-(void)doIt:(NSRadioButtonICM *)radio {
	NSView *container = [radio superview];
	NSArray *items = [container subviews];
	int count = [items count];
	for (int idx = 0; idx < count; idx++) {
		NSButton *other = [items objectAtIndex:idx];
		if (other != radio && [other isKindOfClass:[NSRadioButtonICM class]]) {
			[other setState: 0];
		}
	}
	
	[super doIt: (id)radio];
}

@end
